package com.sskj.aikeeper.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.aikeeper.hangqing.activity.SettingActivity;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.AppVersionBean;
import com.sskj.lib.http.JsonCallBack;


/**
 * @author Hey
 * Create at  2019/06/25
 */
public class SettingPresenter extends BasePresenter<SettingActivity> {

    public void checkVersion(String versionCode) {
        httpService.checkVersion(versionCode)
                .tag(this)
                .execute(new JsonCallBack<HttpData<AppVersionBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<AppVersionBean>> response) {
                        mView.checkVersionOK(response.body().getData());
                    }
                });
    }
}
